﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Text;
using System.Windows; 

namespace WQDSkin.Forms.Controls
{
    //[TypeConverter(typeof(SystemKeyConverter))]
    public class WQDSystemResourceKey : ResourceKey
    {
        private WQDSystemResourceKeyID _id;

        public WQDSystemResourceKey(WQDSystemResourceKeyID _id)
        {
            this._id = _id;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override bool Equals(object o)
        {
            WQDSystemResourceKey key = o as WQDSystemResourceKey;

            if (key != null)
            {
                return (key._id == this._id);
            }

            return false;
        }

        public override Assembly Assembly
        {
            get
            {
                return null;
            }
        }

        internal object Resource
        {
            get
            {
                switch (_id)
                {
                    case WQDSystemResourceKeyID.DefaultOverBackground:
                        return WQDSystemColors.DefaultOverBackground;
                    case WQDSystemResourceKeyID.DefaultPressedBackground:
                        return WQDSystemColors.DefaultPressedBackground;
                }

                return null;
            }
        }
    }
 
}
